package com.gzhryc.shared_device.oem.h5.agent;

public enum ELoginUserRoleType {

	Agent(1, "代理商")			//与ERoleType的Agent枚举Index一致
    , Partner(3, "合伙人")		//与AgentRelationEnum.RoleType的Partner枚举Index保持一致
	, Dealer(98, "经销商")		//与AgentRelationEnum.RoleType的Dealer枚举Index保持一致
    , Clerk(5, "店员");			//与ERoleType的Clerk枚举Index保持一致

    private Integer index;
    private String note;

    ELoginUserRoleType(Integer index, String note) {
        this.index = index;
        this.note = note;
    }

    public Integer index() {
        return index;
    }

    public String note() {
        return note;
    }

    public static String note(Integer index) {
    	ELoginUserRoleType[] temp = ELoginUserRoleType.values();
        for (int i = 0; i < temp.length; i++) {
        	ELoginUserRoleType item = temp[i];
            if (item.index.equals(index)) {
                return item.note;
            }
        }
        return null;
    }
}
